//
//  KFDMACDPriceLabel.m
//  KFD
//
//  Created by Lucky Luke on 8/15/15.
//  Copyright (c) 2015 kfd. All rights reserved.
//

#import "KFDMACDPriceLabel.h"

@interface KFDMACDPriceLabel ()

@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UILabel *paramLabel;
@property (weak, nonatomic) IBOutlet UILabel *deaLabel;
@property (weak, nonatomic) IBOutlet UILabel *difLabel;
@property (weak, nonatomic) IBOutlet UILabel *macdLabel;

@end

@implementation KFDMACDPriceLabel

-(void)setDiagramPoint:(KFDDiagramPoint *)diagramPoint
{
    _diagramPoint=diagramPoint;
    self.priceLabel.text=[NSString stringWithFormat:@"%.2f",diagramPoint.price.floatValue];
    self.priceLabel.hidden=YES;
    self.paramLabel.text=@"(12,26,9)";
    NSNumber* dea=diagramPoint.macd[0];
    NSNumber* dif=diagramPoint.macd[1];
    NSNumber* macd=diagramPoint.macd[2];
    self.deaLabel.text=[NSString stringWithFormat:@"DEA:%.2f",dea.floatValue];
    self.difLabel.text=[NSString stringWithFormat:@"DIF:%.2f",dif.floatValue];
    self.macdLabel.text=[NSString stringWithFormat:@"MACD:%.2f",macd.floatValue];
}

@end
